/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package cz.fimuni.pa165.frontend.restservice;

import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 *
 * @author Ondra
 */
public interface CarRestServiceInterface {

    @RequestMapping(value = "/add", method = RequestMethod.POST, headers = "Content-Type=application/json")
    @ResponseBody
    ResponseEntity<String> addtCar(@RequestBody String json);

    @RequestMapping(value = "/delete/{id}", method = RequestMethod.DELETE)
    @ResponseBody
    ResponseEntity<String> deleteCar(@PathVariable String id);

    @RequestMapping(value = "/getall", method = RequestMethod.GET)
    @ResponseBody
    ResponseEntity<String> getAllCars();

    @RequestMapping(value = "/get/{id}", method = RequestMethod.GET)
    @ResponseBody
    ResponseEntity<String> pokus(@PathVariable(value = "id") Long id);

    @RequestMapping(value = "/update", method = RequestMethod.POST, headers = "Content-Type=application/json")
    @ResponseBody
    ResponseEntity<String> updateCar(@RequestBody String json);
    
}
